package cn.xiaoxige.plugin.task

import cn.xiaoxige.plugin.entity.Person
import org.gradle.api.DefaultTask
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.tasks.TaskAction

/*
 * Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
 */

class TeamTask extends DefaultTask {

    @TaskAction
    void action() {
        println('team task is run...')
        NamedDomainObjectContainer<Person> team = project.extensions.getByName('team')
        println('团队人员如下: ')
        team.forEach {
            println(it.toString())
        }
    }
}
